home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / ada / c01oop.zip / ADAWKBK / SOL2-10.ADA < prev    next >
Text File  |  1992-08-25  |  482b  |  26 lines

  1. -- Problem 2.10
  2. -- by Rick Conn
  3. with Text_IO;
  4. procedure Main is
  5.  
  6.   I, J : INTEGER;
  7.  
  8.   package Int_IO is new Text_IO.Integer_IO (INTEGER);
  9.  
  10. begin -- Main
  11.  
  12.   loop
  13.     Text_IO.Put ("Enter 2 numbers (0 0 to quit): ");
  14.     Int_IO.Get (I);  Int_IO.Get(J);
  15.     Text_IO.New_Line;
  16.     exit when I = 0 and J = 0;
  17.     if J /= 0 and then I/J > 0 then
  18.       Int_IO.Put (I/J);
  19.     else
  20.       Text_IO.Put ("Zero");
  21.     end if;
  22.     Text_IO.New_Line;
  23.   end loop;
  24.  
  25. end Main;
  26.